#include<bits/stdc++.h>
using namespace std;

void bubbleSort(vector<int>& nums){
    for(int i=nums.size()-1;i>=0;--i){
        for(int j=0;j<i;++j){
            if(nums[j]<nums[j+1]){
                swap(nums[j],nums[j+1]);
            }
        }
    }
}

int main(int argc, char const *argv[])
{
    vector<int> nums={2,1,2,3,8,10,565,-10};
    bubbleSort(nums);
    for(auto i:nums){
        cout<<i<<" ";
    }   
    cout<<endl;
    return 0;
}
